package main

import "fmt"

// 创建一个 map 来保存每周 7 天的名字，将它们打印出来并且测试是否存在 "Tuesday" 和 "Hollyday"。

func main() {
	week := make(map[string]int, 7)
	week["Sunday"] = 7
	week["Monday"] = 1
	week["Tuesday"] = 2
	week["Wenesday"] = 3
	week["Thursday"] = 4
	week["Friday"] = 5
	week["Saturday"] = 6
	for name, v := range week {
		fmt.Println(name, ": ", v)
	}

	weeks := map[string]string{
		"Sunday":   "周日",
		"Monday":   "周一",
		"Tuesday":  "周二",
		"Wenesday": "周三",
		"Thursday": "周四",
		"Friday":   "周五",
		"Saturday": "周六",
	}
	for day, name := range weeks {
		fmt.Println(day, ": ", name)
	}
	_, ok := week["Tuesday"]
	fmt.Printf("week contain Tuesday: %v\n", ok)

	_, ok = week["Hollyday"]
	fmt.Printf("week contain Hollyday: %v\n", ok)

}
